package com.njwb.day15.zqzb.ios.io5;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

public class FileWriterDemo01 {
    public static void main(String[] args) {
        Writer writer = null ;
        try {
            writer = new FileWriter(new File("C:\\Users\\Administrator\\Desktop\\adfasdfasdfasfsadfas.txt"),true);
            writer.write("\n中国人民共和国");

        } catch (IOException e) {
            e.printStackTrace();
        }finally {


            if(writer!=null ){
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }
}
